package com.shangma.utils;

public class AsyncFactory {

    // 邮件任务
    public static Runnable sendMail(String email,String message){
        return new Runnable() {
            @Override
            public void run() {
                try {
                    Thread.sleep(3000);
                } catch (InterruptedException e) {
                    e.printStackTrace();
                }
                System.out.println("发送邮件" + Thread.currentThread().getName() + email +"\t"+ message);
            }
        };
    }
}
